<% if @cultural_heritage_cultural_heritages.size > 0 %>

<table class="paginated_table sorted_table">
  <thead>
    <tr>
      <th>Código</th>
      <th>Patrimonio Mueble</th>
      <th>Estado</th>
      <th>Periodo</th>
      <th>Cultura</th>
      <th>Tipología</th>
      <th style="min-width: 110px">Acciones</th>
    </tr>
</thead>
<tbody>
<% @cultural_heritage_cultural_heritages.each do |cultural_heritage_cultural_heritage| %>
  <tr>
    <td><%= cultural_heritage_cultural_heritage.nationalRegistrationCode %></td>
    <td><%= cultural_heritage_cultural_heritage.name %></td>
    <td><%=cultural_heritage_cultural_heritage.str_state %></td>
    <td><%= cultural_heritage_cultural_heritage.str_period %> </td>
    <td><%= cultural_heritage_cultural_heritage.str_culture %> </td>
    <td>
    <%if !cultural_heritage_cultural_heritage.tipology.blank?%>
      <%= cultural_heritage_cultural_heritage.obj_tipology.name %>
    <%end%>
    </td>    
    <td>
      <%= link_to image_tag("navi/search-16-ns.png", :border => 0, :title => 'Mostrar'), :action=>"show", :controller=>"cultural_heritage/cultural_heritages", :id=>cultural_heritage_cultural_heritage.id %>
      <% if (user_signed_in? && ([1,2,4].include?(current_user.role))) %>
      <%= link_to image_tag("navi/pencil-16-ns.png", :border => 0, :title => 'Editar'), edit_cultural_heritage_cultural_heritage_path(cultural_heritage_cultural_heritage) %>
      <%= link_to image_tag("navi/cross-16-ns.png", :border => 0, :title => 'Eliminar'), cultural_heritage_cultural_heritage, :confirm => 'Esta Seguro?', :method => :delete %>
      <%= link_to image_tag("navi/badge-square-check-16-ns.png", :border => 0, :title => 'Partes'),:action=>"agrupador_partes", :controller=>"cultural_heritage/cultural_heritages", :id=>cultural_heritage_cultural_heritage.id %>
      <%end%>
    </td>
  </tr>
<% end %>
  </tbody>
</table>

<% else %>
  <p>Ningún Patrimonio Cultural Mueble Encontrado</p>
<% end %>